import Vue from 'vue'
import Router from 'vue-router'
import login from '@/components/login'
import Home from '@/components/home'
import homes from '@/components/commodity/homes.vue'
import BusinessSetting from '@/components/commodity/BusinessSetting.vue' //商户基本信息设置
import wxSetting from '@/components/commodity/wxSetting.vue' //小程序设置
import DistributionSetting from '@/components/commodity/DistributionSetting' //配送设置
import CommodityAddition from '@/components/commodity/CommodityAddition.vue' //添加商品
import CommodityAdditions from '@/components/commodity/CommodityAdditions.vue' //添加商品新功能测试
import commodityList from '@/components/commodity/commodityList.vue' //商品列表
import shopSetUp from '@/components/setUp/shopSetUp.vue' //商城设置
import addClass from '@/components/commodity/addClass.vue' //添加分类
import OrderManagement from '@/components/commodity/OrderManagement.vue' //订单管理
import bannerSetting from '@/components/commodity/bannerSetting.vue' //焦点图设置
import addPermission from '@/components/commodity/addPermission.vue' //权限管理
import AllocationPermissions from '@/components/commodity/AllocationPermissions.vue' //分配权限，添加用户
import ChangePassword from '@/components/commodity/ChangePassword.vue' //修改密码
import ActivityManagement from '@/components/commodity/ActivityManagement.vue' //活动管理
import TaxonomyActivities from '@/components/commodity/TaxonomyActivities.vue' //活动管理
import pintuanOrderManagement from '@/components/commodity/pintuanOrderManagement.vue' //拼团订单管理
import MembershipList from '@/components/commodity/MembershipList.vue' //会员列表
import ActivitiesTypes from '@/components/commodity/ActivitiesTypes.vue' //活动类型
import oneActivities from '@/components/commodity/oneActivities.vue' //单图活动图片

Vue.use(Router)

export default new Router({
    routes: [{
        path: '/',
        name: 'login',
        component: login
    }, {
        path: '/home',
        name: 'home',
        component: Home,
        children: [{
                path: '/',
                name: 'homes',
                component: homes
            },
            {
                path: '/BusinessSetting',
                name: 'BusinessSetting',
                component: BusinessSetting
            }, {
                path: '/wxSetting',
                name: 'wxSetting',
                component: wxSetting
            }, {
                path: '/DistributionSetting',
                name: 'DistributionSetting',
                component: DistributionSetting
            }, {
                path: '/CommodityAddition',
                name: 'CommodityAddition',
                component: CommodityAddition
            }, {
                path: '/CommodityAdditions',
                name: 'CommodityAdditions',
                component: CommodityAdditions
            }, {
                path: '/commodityList',
                name: 'commodityList',
                component: commodityList
            }, {
                path: '/addClass',
                name: 'addClass',
                component: addClass
            }, {
                path: '/OrderManagement',
                name: 'OrderManagement',
                component: OrderManagement
            }, {
                path: '/bannerSetting',
                name: bannerSetting,
                component: bannerSetting
            }, {
                path: '/addPermission',
                name: addPermission,
                component: addPermission
            }, {
                path: '/AllocationPermissions',
                name: AllocationPermissions,
                component: AllocationPermissions
            }, {
                path: '/ChangePassword',
                name: ChangePassword,
                component: ChangePassword
            }, {
                path: '/ActivityManagement',
                name: ActivityManagement,
                component: ActivityManagement
            }, {
                path: '/TaxonomyActivities',
                name: TaxonomyActivities,
                component: TaxonomyActivities
            }, {
                path: '/pintuanOrderManagement',
                name: pintuanOrderManagement,
                component: pintuanOrderManagement
            },
            {
                path: '/MembershipList',
                name: MembershipList,
                component: MembershipList
            },
            {
                path: '/ActivitiesTypes',
                name: ActivitiesTypes,
                component: ActivitiesTypes
            },
            {
                path: '/oneActivities',
                name: oneActivities,
                component: oneActivities
            }
        ]
    }, {
        path: '/setUp',
        name: 'setUp',
        component: Home,
        children: [{
            path: '/',
            name: '/shopSetUp',
            component: shopSetUp
        }]
    }]
})